class PSInventoryManager extends InventoryManager;

var PSWeaponPistol wPistol;
var PSWeaponFusil wFusil;

var bool bGotPistol;
var bool bGotRifle;

var int AvailableWeapons; // Number of avaiable weapons

function AddWeapon()
{
	AvailableWeapons++;
}

function int GetNumberOfAvailableWeapons()
{
	return AvailableWeapons;
}

function GotRifle()
{
	wFusil = spawn(class'PSWeaponFusil', Owner);	
	AddInventory(wFusil, Pawn(Owner).Weapon != none);

	wFusil.MagAmmo = wFusil.MagMaxAmmo;
	wFusil.AmmoCount = 0;
	wFusil.RecalcularVisor();

	bGotRifle = true;
	AvailableWeapons++;

	// If already with the pistol, then display the switch weapon tutorial
	if(bGotPistol)
	{
		PSPlayerController(Pawn(Owner).Controller).ShowSwitchWeaponTutorial();
	}
	else
	{
		PSPawnDidrik(Owner).CurrentWeapon = PSPawn(Owner).EWeapon.WEAPON_Rifle;
		PSPlayerController(Pawn(Owner).Controller).CurrentWeaponIndex = 1;
		PSPlayerController(Pawn(Owner).Controller).bCanFire = true;
	}

	PSPawnDidrik(Owner).SetAimingSpeed(PSPlayerController(Pawn(Owner).Controller).bCameraZoom);
}

function GotPistol()
{
	wPistol = spawn(class'PSWeaponPistol', Owner);
	AddInventory(wPistol, Pawn(Owner).Weapon != none);

	wPistol.MagAmmo = wPistol.MagMaxAmmo;
	wPistol.AmmoCount = 0;
	wPistol.RecalcularVisor();

	bGotPistol = true;
	AvailableWeapons++;

	// If already with the rifle, then display the switch weapon tutorial
	if(bGotRifle)
	{
		PSPlayerController(Pawn(Owner).Controller).ShowSwitchWeaponTutorial();
	}
	else
	{
		PSPawnDidrik(Owner).CurrentWeapon = PSPawn(Owner).EWeapon.WEAPON_Pistol;
		PSPlayerController(Pawn(Owner).Controller).CurrentWeaponIndex = 2;
		PSPlayerController(Pawn(Owner).Controller).bCanFire = true;
	}
	
	PSPawnDidrik(Owner).SetAimingSpeed(PSPlayerController(Pawn(Owner).Controller).bCameraZoom);
}

DefaultProperties
{
	bGotPistol=false
	bGotRifle=false

	AvailableWeapons = 0;

    PendingFire (0) = 0
    PendingFire (1) = 0
}